using System;
using System.IO;

namespace sd
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Application Mr.Lian");

            Console.WriteLine("input data file path:");

            string filepath = "sd5.sd"; //Console.ReadLine();
            string[] datalines = File.ReadAllLines(filepath);

            SdEngine engine = new SdEngine(new SdModel(datalines));
            engine.CurrentModel.PrintToConsole();

            bool step = args.Length > 0 && args[0] == "--step";

            while (!engine.isComplete())
            {
                if (step)
                {
                    Console.WriteLine("press any key to next step:");
                    Console.ReadKey();
                }

                if (!engine.MoveNext())
                    break;
            }

            Console.WriteLine("test fetch or pull");

            Console.WriteLine("Mission Compalete!");
        }
    }
}
